/*
 * Copyright (c) 2021 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef __UI_CONFIG_H__
#define __UI_CONFIG_H__

#ifdef __cplusplus
extern "C" {
#endif

#define FONT_NAME   (char *)"SourceHanSansSC-Regular.otf"
typedef enum {
    FONT_SIZE_18 = 18,
    FONT_SIZE_20 = 20,
    FONT_SIZE_24 = 24,
    FONT_SIZE_28 = 28,
    FONT_SIZE_32 = 32,
    FONT_SIZE_56 = 56,
    FONT_SIZE_64 = 64,
} FONT_SIZE;

// DEFINED ICON PATH && FILE PATH
#define ICON_ENTER_PATH     (char *)"Hoods/res/image/hoods/ic_forward.png"
#define ICON_BACK0_PATH     (char *)"Hoods/res/image/hoods/ic_back0.png"
#define ICON_BACK1_PATH     (char *)"Hoods/res/image/hoods/ic_back1.png"
#define HOODS_BACKGROUND    (char *)"Hoods/res/image/hoods/background.png"
#define BIG_ITEM_BKG        (char *)"Hoods/res/image/hoods/item_icon_big.png"
#define SMALL_ITEM_BKG      (char *)"Hoods/res/image/hoods/item_icon_small.png"

#define iconimage_PATH     (char *)"Hoods/res/image/hoods/iconimage.png"
#define ICON_VIDEO_PATH     (char *)"Hoods/res/image/hoods/icon_video.png"
#define ICON_CAMERA_PATH    (char *)"Hoods/res/image/hoods/icon_monitor.png"

#define iconimage_PATH_S   (char *)"Hoods/res/image/hoods/iconimage.png"
#define ICON_VIDEO_PATH_S   (char *)"Hoods/res/image/hoods/icon_video.png"
#define ICON_UNKNOW_PATH    (char *)"Hoods/res/image/hoods/unknow.png"

#define SCRSAV_BACKGROUND   (char *)"Hoods/res/image/hoods/screensaver.png"
#define SCRSAV_CLOCK_ICON   (char *)"Hoods/res/image/hoods/icon_time.png"
#define SCRSAV_WEATHER_ICON (char *)"Hoods/res/image/hoods/icon_cloud.png"

#define LISTVIEW_BACKGROUND (char *)"Hoods/res/image/hoods/list_background.png"

#define MENU_FILE_PATH      (char *)"/userdata/menu/"

// DEFINED UI COORD && POSITION
#define SCREEN_WIDTH        960
#define SCREEN_HEIGHT       480

#define START_XPOS          0
#define START_YPOS          0

// screensaver
// clock icon
#define CLOCK_X_POS         369
#define CLOCK_Y_POS         127
#define CLOCK_WIDTH         56
#define CLOCK_HEIGHT        56
// time label
#define TIME_X_POS          443
#define TIME_Y_POS          108
#define TIME_WIDTH          200
#define TIME_HEIGHT         100
// data label
#define DATE_X_POS          360
#define DATE_Y_POS          168
#define DATE_WIDTH          240
#define DATE_HEIGHT         240
// weather icon && label
#define WEA_ICON_X          233
#define WEA_ICON_Y          333
#define WEA_ICON_W          44
#define WEA_ICON_H          44
#define WEATHER_X_POS       279
#define WEATHER_Y_POS       304
#define WEATHER_WIDTH       150
#define WEATHER_HEIGHT      100
// PM 2.5 icon && QAT
#define PM25_X_POS          580
#define PM25_Y_POS          304
#define PM25_WIDTH          82
#define PM25_HEIGHT         100
#define PM25_QAT_X          678
#define PM25_QAT_Y          342
#define PM25_QAT_W          48
#define PM25_QAT_H          24

// main page
// back button
#define BACK_ICON_X         12
#define BACK_ICON_Y         2
#define BACK_ICON_W         48
#define BACK_ICON_H         48

#define CLICK_BACK_ICON_W   (BACK_ICON_W * 2)
#define CLICK_BACK_ICON_H   (BACK_ICON_H * 2)
// weather/date module
#define WEA_DATE_X_POS      72
#define WEA_DATE_Y_POS      52
#define WEA_DATE_WIDTH      396
#define WEA_DATE_HEIGHT     376
// date
#define WEA_DATE_X_DATE     100
#define WEA_DATE_Y_DATE     64
#define WEA_DATE_W_DATE     190
#define WEA_DATE_H_DATE     42
// time
#define WEA_DATE_X_TIME     24
#define WEA_DATE_Y_TIME     103
#define WEA_DATE_W_TIME     320
#define WEA_DATE_H_TIME     100
// week
#define WEA_DATE_X_WEEK     26
#define WEA_DATE_Y_WEEK     300
#define WEA_DATE_W_WEEK     100
#define WEA_DATE_H_WEEK     48
// temperature
#define WEA_DATE_X_TEMP     163
#define WEA_DATE_Y_TEMP     300
#define WEA_DATE_W_TEMP     100
#define WEA_DATE_H_TEMP     48
// weather
#define WEA_DATE_X_WEA      306
#define WEA_DATE_Y_WEA      300
#define WEA_DATE_W_WEA      100
#define WEA_DATE_H_WEA      48

// item module
// item icon
#define ITEM_GROUP_X        476
#define ITEM_GROUP_Y        52
#define ITEM_GROUP_W        412
#define ITEM_GROUP_H        428

#define ITEM_START_X        476
#define ITEM_START_Y        52
#define ITEM_WIDTH          202
#define ITEM_HIEGHT         184
#define ITEM_X_POS          8
#define ITEM_Y_POS          8
// item icon && label
#define ITEM_ICON_X         72
#define ITEM_ICON_Y         36
#define ITEM_ICON_W         56
#define ITEM_ICON_H         56
#define ITEM_LABEL_X        0
#define ITEM_LABEL_Y        104
#define ITEM_LABEL_W        ITEM_WIDTH
#define ITEM_LABEL_H        60

// popup window
#define POP_WIN_X           140
#define POP_WIN_Y           70
#define POP_WIN_W           680
#define POP_WIN_H           360

// group radius
#define GROUP_VIEW_RADIUS   20

// define the rect range struct
typedef struct {
    int x, y, w, h;
} UI_RECT;

// DEFINED OTHERS
#define TMP_BUF_SIZE        256

#define TASK_TIME_PERIOD    1000

#ifdef __cplusplus
}
#endif

#endif
